package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.pojo.User;
import org.example.utils.ElderlyHealthResponseData;
import org.example.utils.LoginUserResponseData;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * ClassName: UserloginMaper
 * Description:
 *
 * @Author Kotaro
 * @Create 2024/11/24 17:32
 * @Version 1.0
 */
@Mapper
public interface UserMapper {

    // 根据用户名、密码和用户类型查询用户
    Boolean loginByIdAndPwd(@Param("userId") String userId, @Param("password") String password);

    int insertUser(@RequestBody User user);

    ElderlyHealthResponseData selectElderlyHealthByElderlyId(@Param("userId") String userId);

    LoginUserResponseData selectUserByUserId(String userId);
}
